package com.wuchao.spring.ioc;

import com.wuchao.entity.User;
import lombok.extern.slf4j.Slf4j;

/**
 * @Author wuchao66
 * @Date 2022/7/1 9:22
 * @Version 1.0
 */
@Slf4j
public class Ioc {//控制反转 依赖注入1) get/set

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    private String name;
    public void show(){
        log.info(name+"");
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    private User user;
    public  void showUser(){
        System.out.println(user.getName());
    }

}
